import Vue from 'vue'
import VueRouter from 'vue-router'
// 注册
const Register = () => import('../views/Register.vue')
// 登录
const Login = () => import('../views/Login.vue')

// 主页
const Index = () => import('../views/index/index.vue')
const MedicVisit = () => import('../views/index/medicVisit.vue')
const OnlineInquery = () => import('../views/index/onlineInquery.vue')
const HospialRecommend = () => import('../views/index/hospialRecommend.vue')
const ReferNearby = () => import('../views/index/referNearby.vue')
const ApplyPosition = () => import('../views/index/applyPosition.vue')
const PublicArticle = () => import('../views/index/publicArticle.vue')
const NurseDetails = () => import('../views/index/nurseDetails.vue')
const BookNurse = () => import('../views/index/bookNurse.vue')
const Order = () => import('../views/index/order.vue')
const ChildOrder = () => import('../views/index/childOrder.vue')
const HealthManage = () => import('../views/index/healthManage.vue')
// 消息
const Message = () => import('../views/message/message.vue')
const Chat = () => import('../views/message/chat.vue')
const ServerNotion = () => import('../views/message/serverNotion.vue')
const AddFriend = () => import('../views/message/addFriend.vue')
// sos
const Sos = () => import('../views/sos/sos.vue')
// 社区广场
const Square = () => import('../views/square/square.vue')
const Details = () => import('../views/square/details.vue')
// 我的
const Mine = () => import('../views/mine/mine.vue')
const EditPersonMassage = () => import('../views/mine/editPersonMassage.vue')
const ToParent = () => import('../views/mine/toParent.vue')
const Quit = () => import('../views/mine/quit.vue')
const PublicServer = () => import('../views/mine/publicServer.vue')
const MyServer = () => import('../views/mine/myServer.vue')
const DaiShangMen = () => import('../views/mine/daiShangMen.vue')
const OldDetails = () => import('../views/mine/oldDetails.vue')
const DaiShouHuo = () => import('../views/mine/daiShouHuo.vue')
const DaifFuWu = () => import('../views/mine/daifFuWu.vue')
const DaiQueDing = () => import('../views/mine/daiQueDing.vue')
const QueDingShouHuo = () => import('../views/mine/queDingShouHuo.vue')
const DaiPingLun = () => import('../views/mine/daiPingLun.vue')
const NurseClientDetails = () => import('../views/mine/nurseClientDetails.vue')

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: Index
  },
  {
    path: '/medicVisit',
    name: 'medicVisit',
    component: MedicVisit
  },
  {
    path: '/onlineInquery',
    name: 'onlineInquery',
    component: OnlineInquery
  },
  {
    path: '/hospialRecommend',
    name: 'hospialRecommend',
    component: HospialRecommend
  },
  {
    path: '/referNearby',
    name: 'referNearby',
    component: ReferNearby
  },
  {
    path: '/applyPosition',
    name: 'applyPosition',
    component: ApplyPosition
  },
  {
    path: '/publicArticle',
    name: 'publicArticle',
    component: PublicArticle
  },
  {
    path: '/nurseDetails',
    name: 'nurseDetails',
    component: NurseDetails
  },
  {
    path: '/bookNurse',
    name: 'bookNurse',
    component: BookNurse
  },
  {
    path: '/order',
    name: 'order',
    component: Order
  },
  {
    path: '/childOrder',
    name: 'childOrder',
    component: ChildOrder
  },
  {
    path: '/healthManage',
    name: 'healthManage',
    component: HealthManage
  },
  {
    path: '/message',
    name: 'message',
    component: Message
  },
  {
    path: '/addFriend',
    name: 'addFriend',
    component: AddFriend
  },
  {
    path: '/chat',
    name: 'chat',
    component: Chat
  },
  {
    path: '/serverNotion',
    name: 'serverNotion',
    component: ServerNotion
  },
  {
    path: '/sos',
    name: 'sos',
    component: Sos
  },
  {
    path: '/square',
    name: 'square',
    component: Square
  },
  {
    path: '/details',
    name: 'details',
    component: Details
  },
  {
    path: '/mine',
    name: 'mine',
    component: Mine
  },
  {
    path: '/editPersonMassage',
    name: 'editPersonMassage',
    component: EditPersonMassage
  },
  {
    path: '/toParent',
    name: 'toParent',
    component: ToParent
  },
  {
    path: '/quit',
    name: 'quit',
    component: Quit
  },
  {
    path: '/publicServer',
    name: 'publicServer',
    component: PublicServer
  },
  {
    path: '/myServer',
    name: 'myServer',
    component: MyServer
  },
  {
    path: '/daiShangMen',
    name: 'daiShangMen',
    component: DaiShangMen
  },
  {
    path: '/daifFuWu',
    name: 'daifFuWu',
    component: DaifFuWu
  },
  {
    path: '/daiQueDing',
    name: 'daiQueDing',
    component: DaiQueDing
  },
  {
    path: '/daiShouHuo',
    name: 'daiShouHuo',
    component: DaiShouHuo
  },
  {
    path: '/daiPingLun',
    name: 'daiPingLun',
    component: DaiPingLun
  },
  {
    path: '/queDingShouHuo',
    name: 'queDingShouHuo',
    component: QueDingShouHuo
  },
  {
    path: '/oldDetails',
    name: 'oldDetails',
    component: OldDetails
  },
  {
    path: '/nurseClientDetails',
    name: 'nurseClientDetails',
    component: NurseClientDetails
  },
  {
    path: '/register',
    name: 'register',
    component: Register
  },
  {
    path: '/login',
    name: 'login',
    component: Login
  }
  // {
  //   path: '/about',
  //   name: 'About',
  //   // route level code-splitting
  //   // this generates a separate chunk (about.[hash].js) for this route
  //   // which is lazy-loaded when the route is visited.
  //   component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
